package cc.autoapi.pucong.auto.flow.persistence.utils.jdbc;

public enum DbType {
    MYSQL("mysql"),
    MARIADB("mariadb"),
    ORACLE("oracle"),
    ORACLE_12C("oracle12c"),
    DB2("db2"),
    H2("h2"),
    HSQL("hsql"),
    SQLITE("sqlite"),
    POSTGRE_SQL("postgresql"),
    SQL_SERVER2005("sqlserver2005"),
    SQL_SERVER("sqlserver"),
    DM("dm"),
    XU_GU("xugu"),
    KINGBASE_ES("kingbasees"),
    PHOENIX("phoenix"),
    GAUSS("zenith"),
    OTHER("other");

    private final String db;
    /**
     * @deprecated
     */
    @Deprecated
    private String dialect;

    public static DbType getDbType(String dbType) {
        DbType[] var1 = values();
        int var2 = var1.length;

        for (int var3 = 0; var3 < var2; ++var3) {
            DbType type = var1[var3];
            if (type.db.equalsIgnoreCase(dbType)) {
                return type;
            }
        }

        return OTHER;
    }

    public String getDb() {
        return this.db;
    }

    /**
     * @deprecated
     */
    @Deprecated
    public String getDialect() {
        return this.dialect;
    }

    private DbType(final String db) {
        this.db = db;
    }
}
